Integrand size = 39, antiderivative size = 123 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=\frac {C x}{a^3}-\frac {(A-B+C) \cos ^2(c+d x) \sin (c+d x)}{5 d (a+a \cos (c+d x))^3}-\frac {(3 A+2 B-7 C) \sin (c+d x)}{15 a d (a+a \cos (c+d x))^2}+\frac {(6 A+4 B-29 C) \sin (c+d x)}{15 d \left (a^3+a^3 \cos (c+d x)\right )} \]
C*x/a^3-1/5*(A-B+C)*cos(d*x+c)^2*sin(d*x+c)/d/(a+a*cos(d*x+c))^3-1/15*(3*A +2*B-7*C)*sin(d*x+c)/a/d/(a+a*cos(d*x+c))^2+1/15*(6*A+4*B-29*C)*sin(d*x+c) /d/(a^3+a^3*cos(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(289\) vs. \(2(123)=246\).
Time = 2.22 (sec) , antiderivative size = 289, normalized size of antiderivative = 2.35 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=\frac {\sec \left (\frac {c}{2}\right ) \sec ^5\left (\frac {1}{2} (c+d x)\right ) \left (150 C d x \cos \left (\frac {d x}{2}\right )+150 C d x \cos \left (c+\frac {d x}{2}\right )+75 C d x \cos \left (c+\frac {3 d x}{2}\right )+75 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+15 C d x \cos \left (2 c+\frac {5 d x}{2}\right )+15 C d x \cos \left (3 c+\frac {5 d x}{2}\right )+30 A \sin \left (\frac {d x}{2}\right )+80 B \sin \left (\frac {d x}{2}\right )-370 C \sin \left (\frac {d x}{2}\right )-30 A \sin \left (c+\frac {d x}{2}\right )-60 B \sin \left (c+\frac {d x}{2}\right )+270 C \sin \left (c+\frac {d x}{2}\right )+30 A \sin \left (c+\frac {3 d x}{2}\right )+40 B \sin \left (c+\frac {3 d x}{2}\right )-230 C \sin \left (c+\frac {3 d x}{2}\right )-30 B \sin \left (2 c+\frac {3 d x}{2}\right )+90 C \sin \left (2 c+\frac {3 d x}{2}\right )+6 A \sin \left (2 c+\frac {5 d x}{2}\right )+14 B \sin \left (2 c+\frac {5 d x}{2}\right )-64 C \sin \left (2 c+\frac {5 d x}{2}\right )\right )}{480 a^3 d} \]
(Sec[c/2]*Sec[(c + d*x)/2]^5*(150*C*d*x*Cos[(d*x)/2] + 150*C*d*x*Cos[c + ( d*x)/2] + 75*C*d*x*Cos[c + (3*d*x)/2] + 75*C*d*x*Cos[2*c + (3*d*x)/2] + 15 *C*d*x*Cos[2*c + (5*d*x)/2] + 15*C*d*x*Cos[3*c + (5*d*x)/2] + 30*A*Sin[(d* x)/2] + 80*B*Sin[(d*x)/2] - 370*C*Sin[(d*x)/2] - 30*A*Sin[c + (d*x)/2] - 6 0*B*Sin[c + (d*x)/2] + 270*C*Sin[c + (d*x)/2] + 30*A*Sin[c + (3*d*x)/2] + 40*B*Sin[c + (3*d*x)/2] - 230*C*Sin[c + (3*d*x)/2] - 30*B*Sin[2*c + (3*d*x )/2] + 90*C*Sin[2*c + (3*d*x)/2] + 6*A*Sin[2*c + (5*d*x)/2] + 14*B*Sin[2*c + (5*d*x)/2] - 64*C*Sin[2*c + (5*d*x)/2]))/(480*a^3*d)
Time = 0.82 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.07, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.282, Rules used = {3042, 3520, 3042, 3447, 3042, 3498, 25, 3042, 3214, 3042, 3127}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^3}dx\) |
\(\Big \downarrow \) 3520 |
\(\displaystyle \frac {\int \frac {\cos (c+d x) (a (3 A+2 B-2 C)+5 a C \cos (c+d x))}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (a (3 A+2 B-2 C)+5 a C \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \frac {\int \frac {5 a C \cos ^2(c+d x)+a (3 A+2 B-2 C) \cos (c+d x)}{(\cos (c+d x) a+a)^2}dx}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {5 a C \sin \left (c+d x+\frac {\pi }{2}\right )^2+a (3 A+2 B-2 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3498 |
\(\displaystyle \frac {-\frac {\int -\frac {2 (3 A+2 B-7 C) a^2+15 C \cos (c+d x) a^2}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {a (3 A+2 B-7 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {2 (3 A+2 B-7 C) a^2+15 C \cos (c+d x) a^2}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {a (3 A+2 B-7 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {2 (3 A+2 B-7 C) a^2+15 C \sin \left (c+d x+\frac {\pi }{2}\right ) a^2}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}-\frac {a (3 A+2 B-7 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {a^2 (6 A+4 B-29 C) \int \frac {1}{\cos (c+d x) a+a}dx+15 a C x}{3 a^2}-\frac {a (3 A+2 B-7 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a^2 (6 A+4 B-29 C) \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+15 a C x}{3 a^2}-\frac {a (3 A+2 B-7 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
\(\Big \downarrow \) 3127 |
\(\displaystyle \frac {\frac {\frac {a^2 (6 A+4 B-29 C) \sin (c+d x)}{d (a \cos (c+d x)+a)}+15 a C x}{3 a^2}-\frac {a (3 A+2 B-7 C) \sin (c+d x)}{3 d (a \cos (c+d x)+a)^2}}{5 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^2(c+d x)}{5 d (a \cos (c+d x)+a)^3}\) |
-1/5*((A - B + C)*Cos[c + d*x]^2*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^3) + (-1/3*(a*(3*A + 2*B - 7*C)*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^2) + (1 5*a*C*x + (a^2*(6*A + 4*B - 29*C)*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])))/ (3*a^2))/(5*a^2)
3.4.58.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b ^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b - a* B + b*C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(a*f*(2*m + 1))), x] + Simp[1 /(a^2*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*A*(m + 1) + m*(b *B - a*C) + b*C*(2*m + 1)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && EqQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(a*A - b*B + a*C)*Cos[e + f*x]*(a + b* Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x ] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) + B*(b*c*m + a *d*(n + 1)) - C*(a*c*m + b*d*(n + 1)) + (d*(a*A - b*B)*(m + n + 2) + C*(b*c *(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c ^2 - d^2, 0] && LtQ[m, -2^(-1)]
Time = 1.90 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.59
method | result | size |
parallelrisch | \(\frac {3 \left (-A +B -C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+10 \left (-B +2 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+15 \left (A +B -7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+60 d x C}{60 a^{3} d}\) | \(73\) |
derivativedivides | \(\frac {-\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{5}-\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}-\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}+\frac {4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +8 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(127\) |
default | \(\frac {-\frac {A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{5}-\frac {\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}-\frac {2 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}+\frac {4 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +8 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(127\) |
risch | \(\frac {C x}{a^{3}}+\frac {2 i \left (15 B \,{\mathrm e}^{4 i \left (d x +c \right )}-45 C \,{\mathrm e}^{4 i \left (d x +c \right )}+15 A \,{\mathrm e}^{3 i \left (d x +c \right )}+30 B \,{\mathrm e}^{3 i \left (d x +c \right )}-135 C \,{\mathrm e}^{3 i \left (d x +c \right )}+15 A \,{\mathrm e}^{2 i \left (d x +c \right )}+40 B \,{\mathrm e}^{2 i \left (d x +c \right )}-185 C \,{\mathrm e}^{2 i \left (d x +c \right )}+15 A \,{\mathrm e}^{i \left (d x +c \right )}+20 B \,{\mathrm e}^{i \left (d x +c \right )}-115 C \,{\mathrm e}^{i \left (d x +c \right )}+3 A +7 B -32 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) | \(172\) |
norman | \(\frac {\frac {C x}{a}+\frac {C x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {3 C x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {3 C x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {\left (A -B -9 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{10 a d}-\frac {\left (A -B +C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 a d}+\frac {\left (A +B -7 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\left (7 A +3 B -43 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{10 a d}-\frac {\left (9 A +B -11 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 a d}+\frac {\left (9 A +7 B -59 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} a^{2}}\) | \(240\) |
1/60*(3*(-A+B-C)*tan(1/2*d*x+1/2*c)^5+10*(-B+2*C)*tan(1/2*d*x+1/2*c)^3+15* (A+B-7*C)*tan(1/2*d*x+1/2*c)+60*d*x*C)/a^3/d
Time = 0.26 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.19 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=\frac {15 \, C d x \cos \left (d x + c\right )^{3} + 45 \, C d x \cos \left (d x + c\right )^{2} + 45 \, C d x \cos \left (d x + c\right ) + 15 \, C d x + {\left ({\left (3 \, A + 7 \, B - 32 \, C\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, A + 2 \, B - 17 \, C\right )} \cos \left (d x + c\right ) + 3 \, A + 2 \, B - 22 \, C\right )} \sin \left (d x + c\right )}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
integrate(cos(d*x+c)*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^3,x, algorithm="fricas")
1/15*(15*C*d*x*cos(d*x + c)^3 + 45*C*d*x*cos(d*x + c)^2 + 45*C*d*x*cos(d*x + c) + 15*C*d*x + ((3*A + 7*B - 32*C)*cos(d*x + c)^2 + 3*(3*A + 2*B - 17* C)*cos(d*x + c) + 3*A + 2*B - 22*C)*sin(d*x + c))/(a^3*d*cos(d*x + c)^3 + 3*a^3*d*cos(d*x + c)^2 + 3*a^3*d*cos(d*x + c) + a^3*d)
Time = 1.88 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.56 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=\begin {cases} - \frac {A \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{20 a^{3} d} + \frac {A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{4 a^{3} d} + \frac {B \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{20 a^{3} d} - \frac {B \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{6 a^{3} d} + \frac {B \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{4 a^{3} d} + \frac {C x}{a^{3}} - \frac {C \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{20 a^{3} d} + \frac {C \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{3 a^{3} d} - \frac {7 C \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{4 a^{3} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \cos {\left (c \right )} + C \cos ^{2}{\left (c \right )}\right ) \cos {\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{3}} & \text {otherwise} \end {cases} \]
Piecewise((-A*tan(c/2 + d*x/2)**5/(20*a**3*d) + A*tan(c/2 + d*x/2)/(4*a**3 *d) + B*tan(c/2 + d*x/2)**5/(20*a**3*d) - B*tan(c/2 + d*x/2)**3/(6*a**3*d) + B*tan(c/2 + d*x/2)/(4*a**3*d) + C*x/a**3 - C*tan(c/2 + d*x/2)**5/(20*a* *3*d) + C*tan(c/2 + d*x/2)**3/(3*a**3*d) - 7*C*tan(c/2 + d*x/2)/(4*a**3*d) , Ne(d, 0)), (x*(A + B*cos(c) + C*cos(c)**2)*cos(c)/(a*cos(c) + a)**3, Tru e))
Time = 0.31 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.67 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=-\frac {C {\left (\frac {\frac {105 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} - \frac {B {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}} - \frac {3 \, A {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \]
integrate(cos(d*x+c)*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^3,x, algorithm="maxima")
-1/60*(C*((105*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d* x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 - 120*arctan(si n(d*x + c)/(cos(d*x + c) + 1))/a^3) - B*(15*sin(d*x + c)/(cos(d*x + c) + 1 ) - 10*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c ) + 1)^5)/a^3 - 3*A*(5*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^5/(c os(d*x + c) + 1)^5)/a^3)/d
Time = 0.32 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.24 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=\frac {\frac {60 \, {\left (d x + c\right )} C}{a^{3}} - \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 10 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 20 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, A a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 105 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
1/60*(60*(d*x + c)*C/a^3 - (3*A*a^12*tan(1/2*d*x + 1/2*c)^5 - 3*B*a^12*tan (1/2*d*x + 1/2*c)^5 + 3*C*a^12*tan(1/2*d*x + 1/2*c)^5 + 10*B*a^12*tan(1/2* d*x + 1/2*c)^3 - 20*C*a^12*tan(1/2*d*x + 1/2*c)^3 - 15*A*a^12*tan(1/2*d*x + 1/2*c) - 15*B*a^12*tan(1/2*d*x + 1/2*c) + 105*C*a^12*tan(1/2*d*x + 1/2*c ))/a^15)/d
Time = 1.57 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.30 \[ \int \frac {\cos (c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^3} \, dx=\frac {C\,x}{a^3}-\frac {{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {B\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6}-\frac {C\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}\right )-{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}-\frac {7\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}\right )+\frac {A\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}-\frac {B\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}+\frac {C\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}}{a^3\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5} \]
(C*x)/a^3 - (cos(c/2 + (d*x)/2)^2*((B*sin(c/2 + (d*x)/2)^3)/6 - (C*sin(c/2 + (d*x)/2)^3)/3) - cos(c/2 + (d*x)/2)^4*((A*sin(c/2 + (d*x)/2))/4 + (B*si n(c/2 + (d*x)/2))/4 - (7*C*sin(c/2 + (d*x)/2))/4) + (A*sin(c/2 + (d*x)/2)^ 5)/20 - (B*sin(c/2 + (d*x)/2)^5)/20 + (C*sin(c/2 + (d*x)/2)^5)/20)/(a^3*d* cos(c/2 + (d*x)/2)^5)